#include <stdio.h>
int main(){
   int n,a = 0,b = 0,number;
   scanf("%d",&n);
      for(int i = 0;i < n;i++) {
   scanf("%d",&number);
      if(number % 2 == 0)
         b++;
      else
       a++;
   }
           printf("%d %d",a,b);
return 0;
}

